tools/ocaml: oxenstored: correctly handle a full ring.
authorIan Campbell <ian.campbell@citrix.com>
Fri, 15 Feb 2013 09:24:43 +0000 (09:24 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 15 Feb 2013 09:24:43 +0000 (09:24 +0000)
commiteeddfad1b339dcaa787230f519a19de1cbc22ad8
treecae5389cdef6dfff5f4d4e999e8c7cb4bc348cec
parent8ce2e609236cc951bfbaa460a8778b16cccb0fcd
tools/ocaml: oxenstored: correctly handle a full ring.

Change 26521:2c0fd406f02c (part of XSA-38 / CVE-2013-0215) incorrectly
caused us to ignore rather than process a completely full ring. Check if
producer and consumer are equal before masking to avoid this, since prod ==
cons + PAGE_SIZE after masking becomes prod == cons.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/ocaml/libs/xb/xs_ring_stubs.c